{% extends 'blog/base.html' %}
{% load static %}
{% load myfilter %}
{% block title %}交流区-四象生八卦{% endblock %}
{% block style %}{{ block.super }}
<link rel="stylesheet" href="{% static 'blog/css/index.css' %}">
{% endblock %}
{% block script %}{{ block.super }}
<script src="{% static 'blog/js/base_bar.js' %}"></script>
<script src="{% static 'blog/js/index.js' %}"></script>
{% endblock %}
{% block nav-li %}
<li><a href="{% url 'blog:index' %}">交流区</a></li>
{% endblock %}
{% block main %}
<div class="main-2">
    <div class="notices">
        <nav>A</nav>
        <h2><span>公告栏</span><span><button type="button" id="btn-merg">紧急</button><button type="button" id="btn-important">重要</button><button type="button" id="btn-normal">一般</button><button type="button" id="btn-allnotice">ALL</button></span></h2>
        <div id="notices-items">
            {% for notice in notices %}
            {% if notice.level == 'A' %}
            <div><div><span class="info-mormal">一般</span><a data-pk="{{ notice.pk }}" class="notice-detial">{{ notice.title }}</a></div><span>{{ notice.create_time|date:"Y-m-d H:i:s" }}</span></div>
            {% elif notice.level == 'B' %}
            <div><div><span class="info-important">重要</span><a data-pk="{{ notice.pk }}" class="notice-detial">{{ notice.title }}</a></div><span>{{ notice.create_time|date:"Y-m-d H:i:s" }}</span></div>
            {% else %}
            <div><div><span class="info-urgent">紧急</span><a data-pk="{{ notice.pk }}" class="notice-detial">{{ notice.title }}</a></div><span>{{ notice.create_time|date:"Y-m-d H:i:s" }}</span></div>
            {% endif %}
            {% endfor %}
        </div>
        <p><a>【公告栏】</a></p>
    </div>
    <div class="plugin-docs">
        <nav>B</nav>
        <h2><span>接口使用范例</span><a href="{% url 'docs:index' %}" target="_blank">接口文档入口</a></h2>
        <div>
            {% for s in samples %}
            <a href="{% url 'blog:pluginsampledetial' s|index:0 s|index:2 %}">{{ s|index:1 }}</a>
            {% endfor %}
        </div>
        <section></section>
        <p><a>【接口使用范例】</a></p>
    </div>
</div>
<div class="main-1">
    <div class="recent">
        <nav>C</nav>
        <h2><span>最近更新</span><span><button type="button" id="btn-halfyear">近半年</button><button type="button" id="btn-month">近一月</button><button type="button" id="btn-halfmonth">近半月</button><button type="button" id="btn-week">近一周</button><button type="button" id="btn-allarticle">ALL</button></span></h2>
        <div id="recent-items">
            {% for article in articles %}
            <article><a href="{% url 'blog:articledetial' article.pk %}">{{ article.title }}</a><span>{{ article.create_time|date:"Y-m-d H:i:s" }}</span></article>
            {% endfor %}
        </div>
        <p><a href="{% url 'blog:boardetial' %}">【最近更新】更多...</a></p>
    </div>
    <div class="good-title">
        <nav>D</nav>
        <h2><span>金选文章</span><form method="post">{% csrf_token %}<input type="search" name="search-good" placeholder="文章搜索" autocomplete="off" required><button><i class="fa fa-search" aria-hidden="true"></i></button></form></h2>
        <div>
            {% for goodArticle in goodArticles %}
            <article><a href="{% url 'blog:articledetial' goodArticle.pk %}">{{ goodArticle.title }}</a><span>{{ goodArticle.create_time|date:"Y-m-d H:i:s" }}</span></article>
            {% endfor %}
        </div>
        <p><a>【精选文章】</a></p>
    </div>
</div>
{% endblock %}
{% block body-other %}
<div class="notice-show">
    <article>
        <h3>公告详情</h3>
        <p></p>
        <p>2020-11-01 14:50:11</p>
    </article>
</div>
{% endblock %}
